var Uploader = function(){
	var upfile = new Ext.form.FileUploadField({
		fieldLabel : '上传附件',
		emptyText: '请选择要上传的文件',
		width : 300,
		name : 'fileName',
		buttonText: '',
		buttonCfg: {
            iconCls: 'icon-compress'
        }
	});
	
	var form = new Ext.form.FormPanel({
		fileUpload: true,  // 注意此属性
		frame : true,
		items : [upfile]
	});
	
	var btn_sub = new Ext.Button({
		text : '提交',
		handler : function(){
			form.getForm().submit({
				waitTitle : '系统提示',
				waitMsg : '数据提交中，请稍候...',
				url : 'file/task/upload.form?timesnap=' + Date.parse(new Date()),
				method : 'POST',
				params : {fileName : upfile.getValue()},
				success : function(fp, o){
					//console.info(o.result);
					alert('success');
				},
				failure : function(fp, o){
					alert('error');
				}
			});
		}
	});
	
	return new Ext.Window({
		title : 'Uploader Demo',
		modal : true,
		width : 500,
		y: 100,
		resizabled : false,
		items : [form],
		buttons : [btn_sub]
	});
	
};